// 创建一个新对象，使用现有的对象来提供新创建的对象的__proto__
function create (proto) {
    function Fn () {}

    Fn.prototype = proto
    Fn.prototype.constructor = Fn()
    return new Fn
}

// Test
let demo = {
    c: '123',
}

let a = Object.create(demo)
console.log(a)
console.log(a.c)  // 123
let b = create(demo)
console.log(b)
console.log(b.c)  // 123
